/* eslint-disable eqeqeq */
/* eslint-disable array-callback-return */
/* eslint-disable no-param-reassign */
/* eslint-disable no-return-assign */
import React from 'react';

import {
  CloseCircleOutlined,
  DownOutlined,
  ExclamationCircleOutlined,
  PlusOutlined,
  UpOutlined,
  QuestionCircleOutlined,
} from '@ant-design/icons';

import { Form } from '@ant-design/compatible';
import '@ant-design/compatible/assets/index.css';

import {
  Card,
  Button,
  Select,
  DatePicker,
  message,
  Row,
  Col,
  Modal,
  Divider,
  Dropdown,
  Menu,
  Input,
} from 'antd';
import moment from 'moment';
import router from 'umi/router';
import { connect } from 'dva';
import styles from '@/utils/utils.less';
import { checkPermissions } from '@/utils/authority';
import StandardTable from '@/components/StandardTable';
import PageHeaderWrapper from '@/components/PageHeaderWrapper';
import TextOverFlow from '../../components/TextOverFlow';
import DictCode from '../../components/DictCode';
import downloadFile from '@/utils/utils';
import HOCSelect from '@/components/AntDesign/Select';

const { Option } = Select;
const FormItem = Form.Item;
const { RangePicker } = DatePicker;
const { confirm } = Modal;

@connect(({ oncechargens, loading }) => ({
  loading: loading.models.oncechargens,
  formFieldsValue: oncechargens.formFieldsValue,
  expandForm: oncechargens.expandForm,
  data: oncechargens.data,
  oncechargens,
  valuesArr: oncechargens.valuesArr,
}))
class CustomerInfoManage extends React.Component {
  state = {
    selectedRows: [],
    selectedRowKeys: [],
    custList: [],
    supplyList: [],
    formValues: {},
  };

  componentDidMount = () => {
    const { dispatch, params } = this.props;
    this.getCustList(null);
    dispatch({
      type: 'oncechargens/updateModalData',
      payload: {
        custDataList: {
          // 清空列表数据
          list: [],
          pagination: {
            current: 1,
            pageSize: 10,
            total: 10,
          },
        },
      },
    });
    dispatch({
      type: 'oncechargens/getSuppList',
      payload: { name: null, ...params },
    }).then(res => {
      if (res && res.success) {
        this.setState({
          supplyList: res.data,
        });
      } else {
        this.setState({
          supplyList: [],
        });
      }
    });
    this.getInitialList();
  };

  // 获取客户名称
  getCustList = e => {
    const { dispatch } = this.props;
    dispatch({
      type: 'oncechargens/getCustListData',
      payload: { suppId: e },
    }).then(res => {
      if (res.success) {
        this.setState({
          custList: res.data,
        });
      } else {
        this.setState({
          custList: [],
        });
      }
    });
  };

  // 通过签约方获取客户名称
  getsuppid = e => {
    const { form } = this.props;
    const { supplyList } = this.state;
    form.resetFields(['custId']);
    // eslint-disable-next-line array-callback-return
    supplyList.map(item => {
      if (item.suppId == e) {
        this.getCustList(item.suppId);
      }
    });
  };

  getInitialList = () => {
    const {
      data: { pagination },
      dispatch,
      location,
      formFieldsValue,
      form,
    } = this.props;
    if (location.queryParam) {
      if (location.queryParam && location.queryParam.suppId) {
        location.queryParam.ordSndrId = location.queryParam.suppId;
      }
      if (location.queryParam && location.queryParam.name) {
        dispatch({
          type: 'publicdata/getCustList',
          payload: [{ ordSndrId: location.queryParam.ordSndrId, name: location.queryParam.name }],
        });
        form.setFieldsValue({ ordSndrId: location.queryParam.ordSndrId });
      }
      dispatch({
        type: 'oncechargens/updateModalData',
        payload: { formFieldsValue: location.queryParam, expandForm: true },
      });
    }
    this.searchList(
      this.processFormData({ ...formFieldsValue }),
      pagination.current,
      pagination.pageSize
    );
  };

  // 点击查询按钮
  searchBtnList = () => {
    const { form, valuesArr, dispatch } = this.props;
    form.validateFieldsAndScroll([...valuesArr], (err, values) => {
      if (!err) {
        dispatch({
          type: 'oncechargens/updateModalData',
          payload: {
            formFieldsValue: values,
          },
        });
        this.searchList(this.processFormData(values));
      }
    });
  };

  // 查询
  searchList = (formFieldsValue, currentPage = 1, pageSize = 10, isClear = true) => {
    if (isClear) {
      this.setState({ selectedRows: [], selectedRowKeys: [] });
    }

    const { dispatch } = this.props;
    const pageArg = {
      currentPage,
      pageSize,
    };
    const values = {
      ...formFieldsValue,
      pageArg,
    };

    dispatch({
      type: 'oncechargens/updateModalData',
      payload: {
        values,
      },
    });

    dispatch({
      type: 'oncechargens/getOnceList',
      payload: values,
    });

    this.setState({
      formValues: formFieldsValue,
    });
  };

  // 处理form数据
  processFormData = fieldsValue => {
    const formFieldsValue = {};
    const tempFieldsValue = fieldsValue;
    Object.keys(tempFieldsValue).forEach(key => {
      if (key === 'createTime') {
        formFieldsValue.creStartDate =
          (tempFieldsValue.createTime &&
            tempFieldsValue.createTime[0] &&
            moment(tempFieldsValue.createTime[0]).format('YYYY-MM-DD')) ||
          null;
        formFieldsValue.creEndDate =
          (tempFieldsValue.createTime &&
            tempFieldsValue.createTime[1] &&
            moment(tempFieldsValue.createTime[1]).format('YYYY-MM-DD')) ||
          null;
      }
      formFieldsValue[key] = tempFieldsValue[key] === undefined ? null : tempFieldsValue[key];
      delete formFieldsValue.createTime;
    });
    return formFieldsValue;
  };

  // 查看详情
  goDetails = id => {
    router.push(`/chargemanage/onebilling/detail?baseInfoId=${id}`);
  };

  // 发送签约方
  operName = e => {
    const { dispatch, formFieldsValue } = this.props;
    dispatch({
      type: 'oncechargens/sendSupper',
      payload: { onceFeeChrgId: e.onceFeeChrgId },
    }).then(res => {
      if (res.success) {
        message.success('发送成功！');
        this.searchList(this.processFormData(formFieldsValue), 1, 10);
      } else {
        message.error('发送失败！');
      }
    });
  };

  // 复选框
  handleSelectRows = (selectedRows, selectedRowKeys) => {
    this.setState({ selectedRowKeys, selectedRows });
  };

  // 表格有变化：比如：切换页码
  handleStandardTableChange = pagination => {
    const { formFieldsValue } = this.props;
    this.searchList(
      this.processFormData(formFieldsValue),
      pagination.current,
      pagination.pageSize,
      false
    );
  };

  // 作废询问框
  goVoid = onceFeeChrgId => {
    this.setState({ selectedRowKeys: [onceFeeChrgId] });
    const {
      dispatch,
      formFieldsValue,
      data: { pagination },
    } = this.props;
    confirm({
      icon: <QuestionCircleOutlined />,
      title: `你确定要作废吗？`,
      okText: '确定',
      okType: 'primary',
      cancelText: '取消',
      style: { top: 200 },
      onOk: () => {
        dispatch({
          type: 'oncechargens/toVoid',
          payload: { onceFeeChrgId, feeSta: 8 },
        }).then(res => {
          if (res.success) {
            message.success(`${res.message || '作废成功！'}`);
            this.searchList(
              this.processFormData(formFieldsValue),
              pagination.current,
              pagination.pageSize
            );
            this.setState({ selectedRowKeys: [] });
          } else {
            message.warning(`${res.message || '作废失败！'}`);
            this.setState({ selectedRowKeys: [] });
          }
        });
      },
      onCancel: () => {
        this.setState({ selectedRowKeys: [] });
      },
    });
  };

  // 重置查询
  resetSearch = () => {
    const { dispatch, form } = this.props;
    form.resetFields();
    form.setFieldsValue({ createTime: null });
    dispatch({
      type: 'oncechargens/updateModalData',
      payload: { formFieldsValue: {} },
    });
  };

  // 模糊搜索
  getData = (value, id) => {
    const { form } = this.props;
    if (id) {
      form.setFieldsValue({ [id]: value });
      this.setState({ [id]: value });
    }
  };

  // 展开收齐
  unfold = () => {
    const { dispatch, expandForm } = this.props;
    dispatch({
      type: 'oncechargens/updateModalData',
      payload: {
        expandForm: !expandForm,
      },
    });
  };

  // 下载
  export = () => {
    const { selectedRowKeys } = this.state;
    if (!selectedRowKeys.length) {
      Modal.confirm({
        icon: <QuestionCircleOutlined />,
        title: '温馨提示',
        content: '如果不选择列表数据，则默认导出当前条件下所有数据',
        okText: '导出',
        cancelText: '取消',
        onOk: () => {
          this.exportExcel();
        },
      });
    } else {
      this.exportExcel();
    }
  };

  // 导出excel
  exportExcel = () => {
    const { formValues, selectedRows } = this.state;
    delete formValues.pageArg;
    const newSelectedRowKeys = [];
    // eslint-disable-next-line array-callback-return
    selectedRows.map(item => {
      newSelectedRowKeys.push(item.onceFeeChrgId);
    });
    const params = { onceFeeChrgIds: newSelectedRowKeys, ...formValues };
    downloadFile(params, '/nsApi/onceChrg/exportOnceChrg', 'POST');
  };

  // 标记已收费
  markCharge = () => {
    const {
      dispatch,
      formFieldsValue,
      data: { pagination },
    } = this.props;
    const { selectedRowKeys, selectedRows } = this.state;
    if (selectedRowKeys.length === 0) {
      message.warning('请选择标记已收费的数据');
      return;
    }
    let stateFlag;
    let feeWayFlag;
    selectedRows.forEach(item => {
      if (+item.feeSta !== 4) {
        stateFlag = true;
      }
      if (+item.feeWay !== 1) {
        feeWayFlag = true;
      }
    });
    if (stateFlag || feeWayFlag) {
      message.warning(`所选数据非"待收费"或收费方式为"合并账单收费"，不可标记已收费`);
      return;
    }
    Modal.confirm({
      icon: <ExclamationCircleOutlined />,
      title: `已选择${selectedRowKeys.length}条数据，是否确认全部标记已收费`,
      content: '请线下和财务核实每笔费用款项已到款，标记后不可取消标记',
      cancelText: '取消',
      okText: '确认',
      onOk: () => {
        dispatch({
          type: 'oncechargens/markCharge',
          payload: {
            onceFeeIds: selectedRowKeys,
          },
        }).then(res => {
          if (res.success) {
            if (res.data) {
              if (selectedRowKeys.length === res.data.succeeNum) {
                message.success('标记成功');
                this.searchList(
                  this.processFormData(formFieldsValue),
                  pagination.current,
                  pagination.pageSize
                );
              } else if (selectedRowKeys.length === res.data.defeatNum) {
                Modal.error({
                  icon: <CloseCircleOutlined />,
                  title: '标记失败',
                  content: '所选数据非待收费状态或收费方式为合并账单收费，不可标记已收费',
                  okText: '关闭',
                  okType: 'default',
                  autoFocusButton: 'cancel',
                  onOk: () => {
                    this.searchList(
                      this.processFormData(formFieldsValue),
                      pagination.current,
                      pagination.pageSize
                    );
                  },
                });
              } else {
                Modal.warning({
                  icon: <ExclamationCircleOutlined />,
                  title: `标记成功`,
                  content: `所选${selectedRowKeys.length}条数据中，${
                    res.data.succeeNum
                  }条数已标记成功，${
                    res.data.defeatNum
                  }条数据状态非待收费状态或收费方式为合并账单收费，不可标记`,
                  okText: '关闭',
                  okType: 'default',
                  autoFocusButton: 'cancel',
                  onOk: () => {
                    this.searchList(
                      this.processFormData(formFieldsValue),
                      pagination.current,
                      pagination.pageSize
                    );
                  },
                });
              }
            }
          } else {
            message.warning(res.message);
          }
        });
      },
    });
  };

  render() {
    const {
      formFieldsValue,
      form: { getFieldDecorator },
      data,
      loading,
    } = this.props;
    const { selectedRowKeys, selectedRows, supplyList, custList } = this.state;
    const formItemLayout = {
      labelCol: { md: { span: 7 } },
      wrapperCol: { md: { span: 17 } },
    };
    const more = (
      <Menu>
        {checkPermissions('ns:onceChrg:exportOnceChrg') && (
          <Menu.Item onClick={() => this.export()}>导出</Menu.Item>
        )}
        {checkPermissions('ns:onceChrg:collectFee') && (
          <Menu.Item onClick={() => this.markCharge()}>标记已收费</Menu.Item>
        )}
      </Menu>
    );

    const columns2 = [
      {
        title: '签约方',
        dataIndex: 'ordSndrName',
        onHeaderCell: () => ({ style: { fontWeight: 'bold' } }),
        render: text => <TextOverFlow text={text} />,
      },
      {
        title: '客户名称',
        dataIndex: 'custName',
        onHeaderCell: () => ({ style: { fontWeight: 'bold' } }),
        render: text => <TextOverFlow text={text} />,
      },
      {
        title: '产品名称',
        dataIndex: 'pdName',
        onHeaderCell: () => ({ style: { fontWeight: 'bold' } }),
      },
      {
        title: '业务年月',
        width: 90,
        dataIndex: 'busiYm',
        onHeaderCell: () => ({ style: { fontWeight: 'bold' } }),
        render: val => `${`${val}`.substring(0, 4)}-${`${val}`.substring(4)}`,
      },
      {
        title: '收费总金额',
        dataIndex: 'feeAmo',
        align: 'right',
        width: 110,
        onHeaderCell: () => ({ style: { fontWeight: 'bolder' } }),
        onCell: () => ({ style: { textAlign: 'right' } }),
        render: feeAmo => (feeAmo === 0 ? 0 : (feeAmo && feeAmo) || '--'),
      },
      {
        title: '状态',
        dataIndex: 'feeStaName',
        onHeaderCell: () => ({ style: { fontWeight: 'bold' } }),
      },
      {
        title: '收费方式',
        dataIndex: 'feeWayName',
        onHeaderCell: () => ({ style: { fontWeight: 'bold' } }),
      },
      {
        title: '创建人',
        dataIndex: 'creName',
        onHeaderCell: () => ({ style: { fontWeight: 'bold' } }),
        render: text => <TextOverFlow text={text} />,
      },
      {
        title: '创建时间',
        dataIndex: 'creTime',
        sorter: (a, b) => new Date(b.creTime) - new Date(a.creTime),
        onHeaderCell: () => ({ style: { fontWeight: 'bold' } }),
        render: val => moment(val).format('YYYY-MM-DD HH:mm') || '无',
      },
      {
        title: '操作',
        dataIndex: 'operation',
        onHeaderCell: () => ({ style: { fontWeight: 'bold', width: 150, textAlign: 'center' } }),
        onCell: () => ({ style: { textAlign: 'center' } }),
        render: (text, record) => {
          // eslint-disable-next-line eqeqeq
          if (record.feeSta == 1 || record.feeSta == 3) {
            // 待收费
            return (
              <span>
                <a
                  onClick={() =>
                    router.push(
                      `/chargmanage/oncechargens/detail?onceFeeChrgId=${record.onceFeeChrgId}`
                    )
                  }
                >
                  查看
                </a>
                <Divider type="vertical" />
                <Dropdown
                  overlay={
                    <Menu>
                      {(checkPermissions('ns:onceChrg:sendOrdSndr') && record.feeSta == 1 && (
                        <Menu.Item onClick={() => this.operName(record)}>发送签约方</Menu.Item>
                      )) ||
                        (checkPermissions('ns:onceChrg:sendOrdSndr') && record.feeSta == 3 && (
                          <Menu.Item onClick={() => this.operName(record)}>发送签约方</Menu.Item>
                        ))}
                      <Menu.Item
                        key="update"
                        onClick={() =>
                          router.push(
                            `/chargmanage/oncechargens/update?baseInfoId=${record.onceFeeChrgId}`
                          )
                        }
                      >
                        修改
                      </Menu.Item>
                      <Menu.Item
                        key="delete"
                        onClick={() => this.goVoid(record.onceFeeChrgId, record.feeSta)}
                      >
                        作废
                      </Menu.Item>
                    </Menu>
                  }
                >
                  <a>
                    更多 <DownOutlined />
                  </a>
                </Dropdown>
              </span>
            );
          }
          if (record.feeSta == 4 && record.feeWay == 1) {
            return (
              <span>
                <a
                  onClick={() =>
                    router.push(
                      `/chargmanage/oncechargens/detail?onceFeeChrgId=${record.onceFeeChrgId}`
                    )
                  }
                >
                  查看
                </a>
                {/* <Divider type="vertical" /> */}
              </span>
            );
          }
          if (record.feeSta == 4 && record.feeWay == 2) {
            return (
              <span>
                <a
                  onClick={() =>
                    router.push(
                      `/chargmanage/oncechargens/detail?onceFeeChrgId=${record.onceFeeChrgId}`
                    )
                  }
                >
                  查看
                </a>
                <Divider type="vertical" />
                <Dropdown
                  overlay={
                    <Menu>
                      <Menu.Item
                        key="update"
                        onClick={() =>
                          router.push(
                            `/chargmanage/oncechargens/update?baseInfoId=${record.onceFeeChrgId}`
                          )
                        }
                      >
                        修改
                      </Menu.Item>
                      <Menu.Item
                        key="delete"
                        onClick={() => this.goVoid(record.onceFeeChrgId, record.feeSta)}
                      >
                        作废
                      </Menu.Item>
                    </Menu>
                  }
                >
                  <a>
                    更多 <DownOutlined />
                  </a>
                </Dropdown>
              </span>
            );
          }
          return (
            <a
              onClick={() =>
                router.push(
                  `/chargmanage/oncechargens/detail?onceFeeChrgId=${record.onceFeeChrgId}`
                )
              }
            >
              查看
            </a>
          );
        },
      },
    ];

    // 向雇员收费
    const renderAdvancedFormtwo = (
      <div className={styles.onceChargeSearch}>
        <Row>
          <Card className={styles.searchCard}>
            <Form layout="inline">
              <Row gutter={{ md: 8, lg: 24, xl: 48 }} style={{ marginBottom: '8px' }}>
                <Col md={8} sm={24}>
                  <FormItem {...formItemLayout} label="签约方" style={{ display: 'block' }}>
                    {getFieldDecorator('ordSndrId', {
                      rules: [{ required: false }],
                      initialValue: formFieldsValue.ordSndrId,
                    })(
                      <HOCSelect
                        placeholder="请输入关键字检索"
                        showSearch
                        optionFilterProp="children"
                        notFoundContent="暂无数据"
                        onSelect={(value, options) => this.getData(value, options)}
                        onChange={this.getsuppid}
                        allowClear
                      >
                        {supplyList.map(item => (
                          <Option key={item.suppId} title={item.name}>
                            {item.name}
                          </Option>
                        ))}
                      </HOCSelect>
                    )}
                  </FormItem>
                </Col>
                <Col md={8} sm={24}>
                  <FormItem {...formItemLayout} label="状态" style={{ display: 'block' }}>
                    {getFieldDecorator('feeSta', {
                      rules: [{ required: false, message: '请输入' }],
                      initialValue: formFieldsValue.feeSta,
                    })(<DictCode dictType="ONCE_CHRG_STATUS" allowClear />)}
                  </FormItem>
                </Col>
                <Col md={8} sm={24}>
                  <FormItem>
                    <Button
                      type="primary"
                      style={{ marginRight: 8 }}
                      onClick={() => this.searchBtnList()}
                    >
                      查询
                    </Button>
                    <Button onClick={this.resetSearch}>重置</Button>
                    <a style={{ marginLeft: 8 }} onClick={this.unfold}>
                      展开 <DownOutlined />
                    </a>
                  </FormItem>
                </Col>
              </Row>
            </Form>
          </Card>
        </Row>

        <Card className={styles.tableCard}>
          <Button
            type="primary"
            onClick={() => router.push('/chargmanage/oncechargens/add')}
            style={{ margin: '0 0 16px 0' }}
          >
            <PlusOutlined />
            新增
          </Button>
          <Dropdown overlay={more}>
            <Button style={{ marginLeft: '8px' }}>
              更多 <DownOutlined />
            </Button>
          </Dropdown>
          <StandardTable
            selectedRows={selectedRows}
            selectedRowKeys={selectedRowKeys}
            loading={loading}
            data={data}
            rowKey="onceFeeChrgId"
            columns={columns2}
            onSelectRow={this.handleSelectRows}
            onChange={this.handleStandardTableChange}
          />
        </Card>
      </div>
    );
    const renderSimpleFormtwo = (
      <div className={styles.onceChargeSearch}>
        <Row>
          <Card className={styles.searchCard}>
            <Form layout="inline">
              <Row gutter={{ md: 8, lg: 24, xl: 48 }}>
                <Col md={8} sm={24}>
                  <FormItem {...formItemLayout} label="签约方" style={{ display: 'block' }}>
                    {getFieldDecorator('ordSndrId', {
                      rules: [{ required: false }],
                      initialValue: formFieldsValue.ordSndrId,
                    })(
                      <HOCSelect
                        placeholder="请输入关键字检索"
                        showSearch
                        optionFilterProp="children"
                        notFoundContent="暂无数据"
                        onSelect={(value, options) => this.getData(value, options)}
                        onChange={this.getsuppid}
                        allowClear
                      >
                        {supplyList.map(item => (
                          <Option key={item.suppId} title={item.name}>
                            {item.name}
                          </Option>
                        ))}
                      </HOCSelect>
                    )}
                  </FormItem>
                </Col>
                <Col md={8} sm={24}>
                  <FormItem {...formItemLayout} label="状态" style={{ display: 'block' }}>
                    {getFieldDecorator('feeSta', {
                      rules: [{ required: false, message: '请输入' }],
                      initialValue: formFieldsValue.feeSta,
                    })(<DictCode dictType="ONCE_CHRG_STATUS" allowClear />)}
                  </FormItem>
                </Col>
                <Col md={8} sm={24}>
                  <FormItem {...formItemLayout} label="客户名称" style={{ display: 'block' }}>
                    {getFieldDecorator('custId', {
                      rules: [{ required: false }],
                      initialValue: formFieldsValue.custId,
                    })(
                      <Select
                        placeholder="请选择"
                        showSearch
                        optionFilterProp="children"
                        allowClear
                      >
                        {custList.map(one => (
                          <Option key={one.custId} value={one.custId} title={one.name}>
                            {one.name}
                          </Option>
                        ))}
                      </Select>
                    )}
                  </FormItem>
                </Col>
              </Row>

              <Row gutter={{ md: 8, lg: 24, xl: 48 }} style={{ marginBottom: '8px' }}>
                <Col md={8} sm={24} style={{ marginTop: 16 }}>
                  <FormItem label="创建日期" {...formItemLayout} style={{ display: 'block' }}>
                    {getFieldDecorator('createTime', {
                      rules: [{ type: 'array', required: false }],
                      initialValue: formFieldsValue.createTime,
                    })(
                      <RangePicker
                        placeholder={['开始日期', '结束日期']}
                        style={{ width: '100%' }}
                        format="YYYY-MM-DD"
                      />
                    )}
                  </FormItem>
                </Col>
                <Col md={8} sm={24} style={{ marginTop: 16 }}>
                  <FormItem label="创建人" {...formItemLayout} style={{ display: 'block' }}>
                    {getFieldDecorator('creName', {
                      rules: [{ required: false, message: '请输入' }],
                      initialValue: formFieldsValue.creName,
                    })(<Input placeholder="请输入" />)}
                  </FormItem>
                </Col>
                <Col md={8} sm={24}>
                  <span style={{ float: 'right', marginTop: 16 }}>
                    <Button
                      type="primary"
                      style={{ marginRight: 8 }}
                      onClick={() => this.searchBtnList()}
                    >
                      查询
                    </Button>
                    <Button onClick={this.resetSearch}>重置</Button>
                    <a onClick={this.unfold} style={{ marginLeft: 8 }}>
                      收起 <UpOutlined />
                    </a>
                  </span>
                </Col>
              </Row>
            </Form>
          </Card>
        </Row>
        <Card className={styles.tableCard}>
          <Button
            type="primary"
            onClick={() => router.push('/chargmanage/oncechargens/add')}
            style={{ margin: '0 0 16px 0' }}
          >
            <PlusOutlined />
            新增
          </Button>
          <Dropdown overlay={more}>
            <Button style={{ marginLeft: '8px' }}>
              更多 <DownOutlined />
            </Button>
          </Dropdown>
          <StandardTable
            selectedRows={selectedRows}
            selectedRowKeys={selectedRowKeys}
            loading={loading}
            data={data}
            rowKey="onceFeeChrgId"
            columns={columns2}
            onSelectRow={this.handleSelectRows}
            onChange={this.handleStandardTableChange}
          />
        </Card>
      </div>
    );

    // 获取页签组件
    const { expandForm } = this.props;
    const renderFormtwo = expandForm ? renderSimpleFormtwo : renderAdvancedFormtwo;
    return <PageHeaderWrapper>{renderFormtwo}</PageHeaderWrapper>;
  }
}
// eslint-disable-next-line no-class-assign
CustomerInfoManage = Form.create({})(CustomerInfoManage);
export default CustomerInfoManage;
